",$comd1); $comd2=str_replace("\n","
",$comd2); $usr=$_SESSION['usr']; }else{ //MySQLに接続 if(!$conn = mysql_connect(_DB_SERVER,_DB_UID,_DB_PASS)){ die('MySQL接続失敗'); } //データベースの選択 if(!$sts = mysql_select_db(_DB_NAME,$conn)){ die('テーブル選択失敗'); } $sqllist=""; $sqllist.="select * from letter where id = '$id' and date = '$ltdate' "; $sqllist.="group by id order by date desc "; $mqlist = mysql_query($sqllist,$conn); if($rec = mysql_fetch_array($mqlist)){ $comd1=$rec['com1']; $comd2=$rec['com2']; $comd1=str_replace("\n","
",$comd1); $comd2=str_replace("\n","
",$comd2); $usr=$rec['usr']; $ray=$rec['ray']; } } if(file_exists("$usr")){ $percent=0; //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 360){ $percent = 360 / $width; } }elseif($width < $height){ if($height > 270){ $percent = 270 / $height; } }else{ if($width > 360){ $percent = 360 / $width; } if($height > 270){ $percent = 270 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>270){ $percent = 270 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } if($ray=="04"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 270){ $percent = 270 / $width; } }elseif($width < $height){ if($height > 320){ $percent = 320 / $height; } }else{ if($width > 270){ $percent = 270 / $width; } if($height > 320){ $percent = 320 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>320){ $percent = 320 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="07" or $ray=="33" or $ray=="34" or $ray=="32"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 210){ $percent = 210 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 210){ $percent = 210 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>210){ $percent = 210 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="08"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 300){ $percent = 300 / $width; } }elseif($width < $height){ if($height > 210){ $percent = 210 / $height; } }else{ if($width > 300){ $percent = 300 / $width; } if($height > 210){ $percent = 210 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>210){ $percent = 210 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="09"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 230){ $percent = 230 / $width; } }elseif($width < $height){ if($height > 280){ $percent = 280 / $height; } }else{ if($width > 230){ $percent = 230 / $width; } if($height > 280){ $percent = 280 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>280){ $percent = 280 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="10"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 260){ $percent = 260 / $width; } }elseif($width < $height){ if($height > 180){ $percent = 180 / $height; } }else{ if($width > 260){ $percent = 260 / $width; } if($height > 180){ $percent = 180 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>180){ $percent = 180 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="11"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 300){ $percent = 300 / $width; } }elseif($width < $height){ if($height > 210){ $percent = 210 / $height; } }else{ if($width > 300){ $percent = 300 / $width; } if($height > 210){ $percent = 210 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>210){ $percent = 210 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="12"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 230){ $percent = 230 / $width; } }elseif($width < $height){ if($height > 300){ $percent = 300 / $height; } }else{ if($width > 230){ $percent = 230 / $width; } if($height > 300){ $percent = 300 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>300){ $percent = 300 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="13"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 220){ $percent = 220 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 220){ $percent = 220 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>220){ $percent = 220 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="14"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>240){ $percent = 240 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="15" or $ray=="35" or $ray=="44"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 210){ $percent = 210 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 210){ $percent = 210 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>210){ $percent = 210 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="16"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 230){ $percent = 230 / $width; } }elseif($width < $height){ if($height > 330){ $percent = 330 / $height; } }else{ if($width > 230){ $percent = 230 / $width; } if($height > 330){ $percent = 330 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>330){ $percent = 330 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="17"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 340){ $percent = 340 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 340){ $percent = 340 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>240){ $percent = 240 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="18"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 340){ $percent = 340 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 340){ $percent = 340 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>240){ $percent = 240 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="19" or $ray=="31"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 320){ $percent = 320 / $width; } }elseif($width < $height){ if($height > 220){ $percent = 220 / $height; } }else{ if($width > 320){ $percent = 320 / $width; } if($height > 220){ $percent = 220 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>220){ $percent = 220 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="20" or $ray=="21"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 340){ $percent = 340 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 340){ $percent = 340 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>240){ $percent = 240 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="22" or $ray=="23"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 340){ $percent = 340 / $width; } }elseif($width < $height){ if($height > 250){ $percent = 250 / $height; } }else{ if($width > 340){ $percent = 340 / $width; } if($height > 250){ $percent = 250 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>250){ $percent = 250 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="24" or $ray=="25"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 220){ $percent = 220 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 220){ $percent = 220 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>220){ $percent = 220 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="26" or $ray=="27"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 350){ $percent = 350 / $width; } }elseif($width < $height){ if($height > 240){ $percent = 240 / $height; } }else{ if($width > 350){ $percent = 350 / $width; } if($height > 240){ $percent = 240 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>240){ $percent = 240 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="28" or $ray=="29"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 330){ $percent = 330 / $width; } }elseif($width < $height){ if($height > 220){ $percent = 220 / $height; } }else{ if($width > 330){ $percent = 330 / $width; } if($height > 220){ $percent = 220 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>220){ $percent = 220 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="36"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 300){ $percent = 300 / $width; } }elseif($width < $height){ if($height > 206){ $percent = 206 / $height; } }else{ if($width > 300){ $percent = 300 / $width; } if($height > 206){ $percent = 206 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>206){ $percent = 206 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="38" or $ray=="39" or $ray=="37" or $ray=="45" or $ray=="43"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 260){ $percent = 260 / $width; } }elseif($width < $height){ if($height > 195){ $percent = 195 / $height; } }else{ if($width > 260){ $percent = 260 / $width; } if($height > 190){ $percent = 190 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>190){ $percent = 190 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } if($ray=="41"){ //画像サイズ自動変更処理 list($width, $height) = getimagesize("$usr"); if($width > $height){ if($width > 280){ $percent = 280 / $width; } }elseif($width < $height){ if($height > 210){ $percent = 210 / $height; } }else{ if($width > 280){ $percent = 280 / $width; } if($height > 210){ $percent = 210 / $height; } } if($percent > 0){ $nwidth = $width * $percent; $nheight = $height * $percent; if($nheight>210){ $percent = 210 / $nheight; $nwidth = $nwidth * $percent; $nheight = $nheight * $percent; } }else{ $nwidth = $width; $nheight = $height; } } } //-----------------------レポートアップ処理終了--------------------------------------------- mb_language("Ja") ; mb_internal_encoding("JIS") ; header('content-type: text/html; charset =' ._CHARSET); ?>